package com.example.demo.mapper;

import com.example.demo.entity.ReleationRules;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ReleatimeRulesMapper {
    @Insert("insert into releationrules(college,beforeneed,afterneed,term,time) values(#{college},#{beforeneed},#{afterneed},#{term},#{time})")
    int add(ReleationRules rules);

    @Select("select * from releationrules where college=#{college} and term=#{term}")
    List<ReleationRules> selectByCollegeAndTerm(@Param("college")String college, @Param("term")String term);

    @Update("update releationrules set beforeneed=#{beforeneed},afterneed=#{afterneed},time=#{time} where college=#{college} and term=#{term}")
    int update(ReleationRules rules);
}
